<template>
  <div class="home">
    <div class="content">
        <div class="header clear">
          <div class="left">你想反馈的意见类型（必填）</div>
          <router-link to="/myfeedback" class="right">反馈记录</router-link>
        </div>
        <div class="main-wrapper">
          <div class="question-list">
            <ul>
              <li>
                <router-link to="/abnormal" class="clear">
                  <div class="left question">功能异常</div>
                  <div class="right question-desc">功能障碍或者不可用 <i></i></div>
                </router-link>
              </li>
              <li>
                <router-link to="/advise" class="clear">
                  <div class="left question">产品建议</div>
                  <div class="right question-desc">体验不佳，我有建议 <i></i></div>
                </router-link>
              </li>
              <li>
                <router-link to="/others" class="clear">
                  <div class="left question">其他问题</div>
                  <div class="right question-desc">快和我们说吧 <i></i></div>
                </router-link>
              </li>
            </ul>
          </div>
        </div>
    </div>

    <Loading :show="loading.show" :text="loading.text"></Loading>
  </div>

</template>

<script>
import $ from 'jquery'
import Loading from '@/components/loading/loading'
export default {
  name: 'home',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
	computed: {
		eq() {
			return this.$store.state.eq;
		},
    loading () {
      return {
        show: this.$store.getters.isLoading,
        text: this.$store.getters.loadingText
      }
    }
	},
  methods: {
    pushLoading () {
      this.$store.dispatch('openLoading', '加载中...')
      // 5秒后关闭
      setTimeout(() => {
        this.$store.dispatch('closeLoading')
      }, 5000)
    }
  },
	mounted () {
    //this.$router.push('/error?type=timeout');
		this.$store.commit('setEq',{data: 2});

		let sendData = {
			enterid:12,
			times:1
		};

		// this.$http.get('/doit/event/list?enterid=12&times=1', sendData).then(data => {
		// this.$http.get('/doit/event/list', {params:sendData}).then(data => {
		//     console.log(data)
		// });
		// alert($('#app').text());
	},
  components:{
    Loading
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">

  @import '../assets/css/config';

  .home{
    .content{
      .header{
        width: 100%;
        height: r(30);
        background: #FAFAFA;
        border: 0 solid #979797;
        padding: 0 4% 0 4.3%;
        >div {
          font-size: r(11);
          color: #888888;
          letter-spacing: -0.38px;
          line-height: r(30);
        }
        a{
          font-size: r(15);
          line-height: r(30);
          color: #888888;
          letter-spacing: 0;
        }
      }
    }
  }

</style>
